﻿using System;

namespace Factory
{
    class Program
    {
        static void Main(string[] args)
        {
            // 使用工厂创建对象
            IClusteringAlgorithm kmeans = ClusteringFactory.CreateClustering("kmeans");
            Console.WriteLine(kmeans.Calculate());

            IClusteringAlgorithm dbscan = ClusteringFactory.CreateClustering("dbscan");
            Console.WriteLine(dbscan.Calculate());

            IClusteringAlgorithm hierarchical = ClusteringFactory.CreateClustering("hierarchical");
            Console.WriteLine(hierarchical.Calculate());
        }
    }
}